package org.example.test4;

import java.util.Arrays;

public class StringSort {
    public static void main(String[] args) {
        //4.有一个字符串:"91 27 46 38 50",请写程序实现最终输出结果是:27 38 46 50 91
        String input = "91 27 46 38 50";
        String[] numbers = input.split(" ");
        Arrays.sort(numbers);
        String sortedString = String.join(" ", numbers);
        System.out.println("最终输出结果是: " + sortedString);
    }
}
